﻿using Shop.Collect;
using Shop.Model.UserGrade;
using Shop.RemoteModel.UserGrade.Model;
using WeDonekRpc.Client;
using WeDonekRpc.Client.Interface;

namespace Shop.Service.RpcEvent
{
    internal class UserGradeEvent : IRpcApiService
    {
        private readonly IUserGradeCollect _Service;

        public UserGradeEvent (IUserGradeCollect service)
        {
            this._Service = service;
        }

        public UserGradeDto[] GetUserGrades ()
        {
            GradeBase[] list = this._Service.GetGrades();
            return list.ConvertMap<GradeBase, UserGradeDto>();
        }
    }
}
